/*
 * Se utilizan los metodos de TreeMaps dentro de JCF
 */
package wordtypecounter;

/**
 *
 * @author Luis José
 */
import java.util.*;

public class TreeMaps implements WordSet{
    TreeMap treemap;
    static int cont = 0;
    
    public TreeMaps(){
        treemap = new TreeMap();
    }
    
    public Word get(Word wordObject){
        Word temp = (Word) treemap.get(wordObject.getWord());
        return temp;
    }
    
    public void add(Word word){
        if(!(treemap.containsKey(word.getWord()))) treemap.put(word.getWord(), word);
    }
}